package com.abcd.godating.utils.json;

import java.io.IOException;
import java.sql.Date;

import org.codehaus.jackson.JsonGenerator;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.JsonSerializer;
import org.codehaus.jackson.map.SerializerProvider;

public class CustomSqlDateSerializer extends JsonSerializer<Date>
{
  public void serialize(Date date, JsonGenerator jgen, SerializerProvider provider)
    throws IOException, JsonProcessingException
  {
    jgen.writeString("\\/Date(" + date.getTime() + ")\\/");
  }
}